.class abstract Lcom/mobisage/android/l;
.super Landroid/widget/FrameLayout;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/mobisage/android/l$c;,
        Lcom/mobisage/android/l$a;,
        Lcom/mobisage/android/l$b;
    }
.end annotation


# instance fields
.field private a:Lcom/mobisage/android/l;

.field protected adSize:I

.field protected adViewState:I

.field private b:Lcom/mobisage/android/l$a;

.field protected backWebView:Lcom/mobisage/android/n;

.field private c:Lcom/mobisage/android/l$c;

.field protected context:Landroid/content/Context;

.field private d:Ljava/util/concurrent/LinkedBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/LinkedBlockingQueue",
            "<",
            "Lcom/mobisage/android/b;",
            ">;"
        }
    .end annotation
.end field

.field private e:Ljava/lang/String;

.field private f:Ljava/lang/String;

.field protected frontWebView:Lcom/mobisage/android/n;

.field private g:Ljava/lang/String;

.field protected listener:Lcom/mobisage/android/IMobiSageAdViewListener;

.field protected mainHandler:Landroid/os/Handler;

.field protected viewSwitcher:Landroid/widget/ViewSwitcher;

.field protected webClient:Lcom/mobisage/android/m;


# direct methods
.method public constructor <init>(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 47
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 48
    iput-object p1, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    .line 49
    iput-object p3, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    .line 50
    iput-object p4, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    .line 51
    iput-object p5, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    .line 52
    iput p2, p0, Lcom/mobisage/android/l;->adSize:I

    .line 54
    iput-object p0, p0, Lcom/mobisage/android/l;->a:Lcom/mobisage/android/l;

    .line 55
    invoke-virtual {p0, p1}, Lcom/mobisage/android/l;->initMobiSageAdView(Landroid/content/Context;)V

    .line 56
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    const/4 v2, -0x1

    .line 59
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 60
    iput-object p1, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    .line 62
    iput v2, p0, Lcom/mobisage/android/l;->adSize:I

    .line 63
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http://schemas.android.com/apk/res/"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "adsize"

    invoke-interface {p2, v0, v1, v2}, Landroid/util/AttributeSet;->getAttributeIntValue(Ljava/lang/String;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/mobisage/android/l;->adSize:I

    .line 64
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http://schemas.android.com/apk/res/"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "publisherID"

    invoke-interface {p2, v0, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    .line 65
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http://schemas.android.com/apk/res/"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "customdata"

    invoke-interface {p2, v0, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    .line 66
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http://schemas.android.com/apk/res/"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "keyword"

    invoke-interface {p2, v0, v1}, Landroid/util/AttributeSet;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    .line 68
    iput-object p0, p0, Lcom/mobisage/android/l;->a:Lcom/mobisage/android/l;

    .line 69
    invoke-virtual {p0, p1}, Lcom/mobisage/android/l;->initMobiSageAdView(Landroid/content/Context;)V

    .line 70
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 35
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 36
    iput-object p1, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    .line 37
    iput-object p2, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    .line 38
    iput-object p3, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    .line 39
    iput-object p4, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    .line 40
    const/4 v0, -0x1

    iput v0, p0, Lcom/mobisage/android/l;->adSize:I

    .line 42
    iput-object p0, p0, Lcom/mobisage/android/l;->a:Lcom/mobisage/android/l;

    .line 43
    invoke-virtual {p0, p1}, Lcom/mobisage/android/l;->initMobiSageAdView(Landroid/content/Context;)V

    .line 44
    return-void
.end method

.method private a()I
    .locals 7

    .prologue
    const/4 v6, 0x0

    const/4 v5, -0x1

    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 218
    iget-object v0, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    if-nez v0, :cond_0

    move v0, v5

    .line 267
    :goto_0
    return v0

    .line 224
    :cond_0
    :try_start_0
    iget-object v0, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    .line 226
    :cond_1
    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v1

    const-string v2, "android.app.Activity"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_2

    .line 227
    invoke-virtual {v0}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;

    move-result-object v0

    .line 229
    if-nez v0, :cond_1

    .line 230
    :cond_2
    const-string v1, "mResumed"

    invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v1

    .line 233
    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 234
    iget-object v2, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    invoke-virtual {v1, v2}, Ljava/lang/reflect/Field;->getBoolean(Ljava/lang/Object;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v1

    .line 235
    :try_start_1
    const-string v2, "mDestroyed"

    invoke-virtual {v0, v2}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    .line 236
    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 237
    iget-object v2, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    invoke-virtual {v0, v2}, Ljava/lang/reflect/Field;->getBoolean(Ljava/lang/Object;)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result v0

    .line 241
    :goto_1
    if-eqz v0, :cond_3

    move v0, v5

    .line 242
    goto :goto_0

    .line 238
    :catch_0
    move-exception v0

    move v0, v3

    :goto_2
    move v1, v0

    move v0, v3

    goto :goto_1

    .line 245
    :cond_3
    if-nez v1, :cond_4

    move v0, v3

    .line 246
    goto :goto_0

    .line 248
    :cond_4
    iget-object v0, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    const-string v1, "power"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/PowerManager;

    .line 249
    invoke-virtual {v0}, Landroid/os/PowerManager;->isScreenOn()Z

    move-result v0

    if-nez v0, :cond_5

    move v0, v3

    .line 250
    goto :goto_0

    .line 252
    :cond_5
    invoke-static {}, Lcom/mobisage/android/w;->a()Lcom/mobisage/android/w;

    move-result-object v0

    const-string v1, "adswitch"

    invoke-virtual {v0, v1}, Lcom/mobisage/android/w;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_8

    .line 254
    iget-object v0, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    if-eqz v0, :cond_7

    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    if-eqz v0, :cond_7

    .line 255
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v1, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v1}, Landroid/widget/ViewSwitcher;->removeView(Landroid/view/View;)V

    .line 256
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->destroy()V

    .line 257
    iput-object v6, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    .line 258
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    if-eqz v0, :cond_6

    .line 259
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v1, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v1}, Landroid/widget/ViewSwitcher;->removeView(Landroid/view/View;)V

    .line 260
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->destroy()V

    .line 261
    iput-object v6, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    .line 263
    :cond_6
    iget-object v0, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    invoke-interface {v0, p0}, Lcom/mobisage/android/IMobiSageAdViewListener;->onMobiSageAdViewHide(Ljava/lang/Object;)V

    :cond_7
    move v0, v3

    .line 265
    goto/16 :goto_0

    :cond_8
    move v0, v4

    .line 267
    goto/16 :goto_0

    .line 238
    :catch_1
    move-exception v0

    move v0, v1

    goto :goto_2
.end method

.method static synthetic a(Lcom/mobisage/android/l;)Lcom/mobisage/android/l;
    .locals 1
    .parameter

    .prologue
    .line 25
    iget-object v0, p0, Lcom/mobisage/android/l;->a:Lcom/mobisage/android/l;

    return-object v0
.end method

.method static synthetic a(Lcom/mobisage/android/l;Lcom/mobisage/android/b;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 25
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/LinkedBlockingQueue;->remove(Ljava/lang/Object;)Z

    const/4 v0, 0x0

    iput v0, p0, Lcom/mobisage/android/l;->adViewState:I

    return-void
.end method

.method static synthetic b(Lcom/mobisage/android/l;Lcom/mobisage/android/b;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 25
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/LinkedBlockingQueue;->remove(Ljava/lang/Object;)Z

    return-void
.end method

.method static synthetic c(Lcom/mobisage/android/l;Lcom/mobisage/android/b;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 25
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/LinkedBlockingQueue;->remove(Ljava/lang/Object;)Z

    return-void
.end method


# virtual methods
.method protected destoryAdView()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 186
    iput-object v3, p0, Lcom/mobisage/android/l;->c:Lcom/mobisage/android/l$c;

    .line 187
    iput-object v3, p0, Lcom/mobisage/android/l;->b:Lcom/mobisage/android/l$a;

    .line 188
    :goto_0
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0}, Ljava/util/concurrent/LinkedBlockingQueue;->size()I

    move-result v0

    if-eqz v0, :cond_0

    .line 189
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0}, Ljava/util/concurrent/LinkedBlockingQueue;->poll()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/mobisage/android/b;

    .line 190
    invoke-static {}, Lcom/mobisage/android/e;->a()Lcom/mobisage/android/e;

    move-result-object v1

    const/16 v2, 0x3ef

    invoke-virtual {v1, v2, v0}, Lcom/mobisage/android/e;->a(ILcom/mobisage/android/b;)V

    goto :goto_0

    .line 192
    :cond_0
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0}, Ljava/util/concurrent/LinkedBlockingQueue;->clear()V

    .line 193
    iput-object v3, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    .line 195
    iput-object v3, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    .line 196
    iput-object v3, p0, Lcom/mobisage/android/l;->webClient:Lcom/mobisage/android/m;

    .line 198
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    invoke-virtual {v0}, Landroid/widget/ViewSwitcher;->clearAnimation()V

    .line 199
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    invoke-virtual {v0}, Landroid/widget/ViewSwitcher;->removeAllViews()V

    .line 200
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->destroy()V

    .line 201
    iput-object v3, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    .line 202
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    if-eqz v0, :cond_1

    .line 203
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->destroy()V

    .line 204
    iput-object v3, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    .line 206
    :cond_1
    invoke-virtual {p0}, Lcom/mobisage/android/l;->removeAllViews()V

    .line 207
    iput-object v3, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    .line 209
    iput-object v3, p0, Lcom/mobisage/android/l;->a:Lcom/mobisage/android/l;

    .line 210
    iput-object v3, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    .line 211
    invoke-static {}, Ljava/lang/System;->gc()V

    .line 212
    return-void
.end method

.method protected finalize()V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .prologue
    .line 76
    invoke-super {p0}, Ljava/lang/Object;->finalize()V

    .line 77
    return-void
.end method

.method public getCustomData()Ljava/lang/String;
    .locals 1

    .prologue
    .line 112
    iget-object v0, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    return-object v0
.end method

.method public getKeyword()Ljava/lang/String;
    .locals 1

    .prologue
    .line 100
    iget-object v0, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    return-object v0
.end method

.method protected initMobiSageAdView(Landroid/content/Context;)V
    .locals 4
    .parameter "context"

    .prologue
    const/4 v3, 0x0

    .line 120
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/mobisage/android/l;->setAnimationCacheEnabled(Z)V

    .line 122
    invoke-static {}, Lcom/mobisage/android/MobiSageManager;->getInstance()Lcom/mobisage/android/MobiSageManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/mobisage/android/MobiSageManager;->a(Landroid/content/Context;)V

    .line 124
    new-instance v0, Lcom/mobisage/android/m;

    invoke-direct {v0}, Lcom/mobisage/android/m;-><init>()V

    iput-object v0, p0, Lcom/mobisage/android/l;->webClient:Lcom/mobisage/android/m;

    .line 125
    iget-object v0, p0, Lcom/mobisage/android/l;->webClient:Lcom/mobisage/android/m;

    new-instance v1, Lcom/mobisage/android/SNSSSLSocketFactory$a;

    invoke-direct {v1, p0, v3}, Lcom/mobisage/android/SNSSSLSocketFactory$a;-><init>(Lcom/mobisage/android/l;B)V

    iput-object v1, v0, Lcom/mobisage/android/m;->a:Lcom/mobisage/android/SNSSSLSocketFactory$a;

    .line 127
    iget-object v0, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    if-nez v0, :cond_0

    .line 128
    sget-object v0, Lcom/mobisage/android/r;->a:Ljava/lang/String;

    iput-object v0, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    .line 130
    :cond_0
    iget-object v0, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    const-string v1, " "

    const-string v2, ""

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    .line 132
    iput v3, p0, Lcom/mobisage/android/l;->adViewState:I

    .line 134
    new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-direct {v0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V

    iput-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    .line 136
    new-instance v0, Lcom/mobisage/android/l$a;

    invoke-direct {v0, p0, v3}, Lcom/mobisage/android/l$a;-><init>(Lcom/mobisage/android/l;B)V

    iput-object v0, p0, Lcom/mobisage/android/l;->b:Lcom/mobisage/android/l$a;

    .line 137
    new-instance v0, Lcom/mobisage/android/l$c;

    invoke-direct {v0, p0, v3}, Lcom/mobisage/android/l$c;-><init>(Lcom/mobisage/android/l;B)V

    iput-object v0, p0, Lcom/mobisage/android/l;->c:Lcom/mobisage/android/l$c;

    .line 138
    new-instance v0, Landroid/os/Handler;

    invoke-virtual {p1}, Landroid/content/Context;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    new-instance v2, Lcom/mobisage/android/l$b;

    invoke-direct {v2, p0, v3}, Lcom/mobisage/android/l$b;-><init>(Lcom/mobisage/android/l;B)V

    invoke-direct {v0, v1, v2}, Landroid/os/Handler;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;)V

    iput-object v0, p0, Lcom/mobisage/android/l;->mainHandler:Landroid/os/Handler;

    .line 140
    iget v0, p0, Lcom/mobisage/android/l;->adSize:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_1

    .line 141
    invoke-static {}, Lcom/mobisage/android/MobiSageAdSize;->a()I

    move-result v0

    iput v0, p0, Lcom/mobisage/android/l;->adSize:I

    .line 142
    :cond_1
    new-instance v0, Landroid/widget/ViewSwitcher;

    invoke-direct {v0, p1}, Landroid/widget/ViewSwitcher;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    .line 143
    new-instance v0, Landroid/widget/FrameLayout$LayoutParams;

    iget v1, p0, Lcom/mobisage/android/l;->adSize:I

    invoke-static {v1}, Lcom/mobisage/android/MobiSageAdSize;->b(I)I

    move-result v1

    iget v2, p0, Lcom/mobisage/android/l;->adSize:I

    invoke-static {v2}, Lcom/mobisage/android/MobiSageAdSize;->c(I)I

    move-result v2

    const/16 v3, 0x99

    invoke-direct {v0, v1, v2, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    .line 144
    iget-object v1, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    invoke-virtual {v1, v0}, Landroid/widget/ViewSwitcher;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 145
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    invoke-virtual {p0, v0}, Lcom/mobisage/android/l;->addView(Landroid/view/View;)V

    .line 146
    return-void
.end method

.method protected onLoadAdFinish()V
    .locals 3

    .prologue
    const/4 v1, 0x0

    .line 397
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    invoke-virtual {v0}, Landroid/widget/ViewSwitcher;->getChildCount()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 407
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 408
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v1, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v2, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v1, v2}, Landroid/widget/ViewSwitcher;->indexOfChild(Landroid/view/View;)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/ViewSwitcher;->setDisplayedChild(I)V

    .line 410
    :goto_0
    invoke-virtual {p0}, Lcom/mobisage/android/l;->switchAdView()V

    .line 411
    return-void

    .line 399
    :pswitch_0
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v1, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v1}, Landroid/widget/ViewSwitcher;->addView(Landroid/view/View;)V

    goto :goto_0

    .line 402
    :pswitch_1
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 403
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v1, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v1}, Landroid/widget/ViewSwitcher;->addView(Landroid/view/View;)V

    .line 404
    iget-object v0, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v1, p0, Lcom/mobisage/android/l;->viewSwitcher:Landroid/widget/ViewSwitcher;

    iget-object v2, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v1, v2}, Landroid/widget/ViewSwitcher;->indexOfChild(Landroid/view/View;)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/ViewSwitcher;->setDisplayedChild(I)V

    goto :goto_0

    .line 397
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected onRefreshTaskTrigger()V
    .locals 0

    .prologue
    .line 279
    invoke-virtual {p0}, Lcom/mobisage/android/l;->requestADFromDE()Z

    .line 280
    return-void
.end method

.method protected requestADFinish(Lcom/mobisage/android/b;)V
    .locals 6
    .parameter "action"

    .prologue
    const/4 v2, 0x0

    .line 283
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/LinkedBlockingQueue;->remove(Ljava/lang/Object;)Z

    .line 285
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    if-nez v0, :cond_2

    .line 286
    new-instance v0, Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/mobisage/android/n;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    .line 287
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/webkit/WebSettings;->setSupportZoom(Z)V

    .line 288
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v2}, Lcom/mobisage/android/n;->setBackgroundColor(I)V

    .line 289
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->e(Ljava/lang/String;)V

    .line 290
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->d(Ljava/lang/String;)V

    .line 291
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->webClient:Lcom/mobisage/android/m;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 292
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    const-string v1, ""

    iget-object v2, p1, Lcom/mobisage/android/b;->d:Landroid/os/Bundle;

    const-string v3, "BannerHTML"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "text/html"

    const-string v4, "UTF-8"

    const-string v5, ""

    invoke-virtual/range {v0 .. v5}, Lcom/mobisage/android/n;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 294
    iget-object v0, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    if-eqz v0, :cond_0

    .line 295
    iget-object v0, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    invoke-interface {v0, p0}, Lcom/mobisage/android/IMobiSageAdViewListener;->onMobiSageAdViewShow(Ljava/lang/Object;)V

    .line 312
    :cond_0
    :goto_0
    iget-object v0, p1, Lcom/mobisage/android/b;->d:Landroid/os/Bundle;

    const-string v1, "LpgCache"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 313
    new-instance v0, Lcom/mobisage/android/b;

    invoke-direct {v0}, Lcom/mobisage/android/b;-><init>()V

    .line 314
    iget-object v1, p0, Lcom/mobisage/android/l;->c:Lcom/mobisage/android/l$c;

    iput-object v1, v0, Lcom/mobisage/android/b;->g:Lcom/mobisage/android/a;

    .line 315
    iget-object v1, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v2, "LpgCache"

    iget-object v3, p1, Lcom/mobisage/android/b;->d:Landroid/os/Bundle;

    const-string v4, "LpgCache"

    invoke-virtual {v3, v4}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V

    .line 317
    iget-object v1, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v1, v0}, Ljava/util/concurrent/LinkedBlockingQueue;->add(Ljava/lang/Object;)Z

    .line 319
    invoke-static {}, Lcom/mobisage/android/e;->a()Lcom/mobisage/android/e;

    move-result-object v1

    const/16 v2, 0x3ee

    invoke-virtual {v1, v2, v0}, Lcom/mobisage/android/e;->a(ILcom/mobisage/android/b;)V

    .line 321
    :cond_1
    return-void

    .line 298
    :cond_2
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    if-nez v0, :cond_3

    .line 299
    new-instance v0, Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/mobisage/android/n;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    .line 300
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0, v2}, Lcom/mobisage/android/n;->setBackgroundColor(I)V

    .line 301
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->e(Ljava/lang/String;)V

    .line 302
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/webkit/WebSettings;->setSupportZoom(Z)V

    .line 304
    :cond_3
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->d(Ljava/lang/String;)V

    .line 305
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    iget-object v1, p0, Lcom/mobisage/android/l;->webClient:Lcom/mobisage/android/m;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 306
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    const-string v1, ""

    iget-object v2, p1, Lcom/mobisage/android/b;->d:Landroid/os/Bundle;

    const-string v3, "BannerHTML"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "text/html"

    const-string v4, "UTF-8"

    const-string v5, ""

    invoke-virtual/range {v0 .. v5}, Lcom/mobisage/android/n;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 308
    iget-object v0, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    if-eqz v0, :cond_0

    .line 309
    iget-object v0, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    invoke-interface {v0, p0}, Lcom/mobisage/android/IMobiSageAdViewListener;->onMobiSageAdViewUpdate(Ljava/lang/Object;)V

    goto :goto_0
.end method

.method protected requestADFromDE()Z
    .locals 5

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 167
    iget v0, p0, Lcom/mobisage/android/l;->adViewState:I

    if-ne v0, v4, :cond_0

    move v0, v3

    .line 182
    :goto_0
    return v0

    .line 170
    :cond_0
    :goto_1
    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0}, Ljava/util/concurrent/LinkedBlockingQueue;->size()I

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0}, Ljava/util/concurrent/LinkedBlockingQueue;->poll()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/mobisage/android/b;

    const/4 v1, 0x0

    iput-object v1, v0, Lcom/mobisage/android/b;->g:Lcom/mobisage/android/a;

    invoke-static {}, Lcom/mobisage/android/e;->a()Lcom/mobisage/android/e;

    move-result-object v1

    const/16 v2, 0x3ef

    invoke-virtual {v1, v2, v0}, Lcom/mobisage/android/e;->a(ILcom/mobisage/android/b;)V

    goto :goto_1

    .line 172
    :cond_1
    invoke-direct {p0}, Lcom/mobisage/android/l;->a()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    move v0, v3

    .line 182
    goto :goto_0

    :pswitch_0
    move v0, v4

    .line 174
    goto :goto_0

    .line 176
    :pswitch_1
    invoke-virtual {p0}, Lcom/mobisage/android/l;->sendADRequest()V

    move v0, v4

    .line 177
    goto :goto_0

    .line 179
    :pswitch_2
    invoke-virtual {p0}, Lcom/mobisage/android/l;->destoryAdView()V

    move v0, v3

    .line 180
    goto :goto_0

    .line 172
    :pswitch_data_0
    .packed-switch -0x1
        :pswitch_2
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected sendADRequest()V
    .locals 4

    .prologue
    .line 149
    const/4 v0, 0x1

    iput v0, p0, Lcom/mobisage/android/l;->adViewState:I

    .line 151
    new-instance v0, Lcom/mobisage/android/b;

    invoke-direct {v0}, Lcom/mobisage/android/b;-><init>()V

    .line 152
    iget-object v1, p0, Lcom/mobisage/android/l;->b:Lcom/mobisage/android/l$a;

    iput-object v1, v0, Lcom/mobisage/android/b;->g:Lcom/mobisage/android/a;

    .line 153
    iget-object v1, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v2, "AdSize"

    iget v3, p0, Lcom/mobisage/android/l;->adSize:I

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 154
    iget-object v1, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v2, "PublisherID"

    iget-object v3, p0, Lcom/mobisage/android/l;->e:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 155
    iget-object v1, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    if-eqz v1, :cond_0

    .line 156
    iget-object v1, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v2, "Keyword"

    iget-object v3, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 160
    :goto_0
    iget-object v1, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v2, "NetworkState"

    iget-object v3, p0, Lcom/mobisage/android/l;->context:Landroid/content/Context;

    invoke-static {v3}, Lcom/mobisage/android/y;->c(Landroid/content/Context;)I

    move-result v3

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 162
    iget-object v1, p0, Lcom/mobisage/android/l;->d:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v1, v0}, Ljava/util/concurrent/LinkedBlockingQueue;->add(Ljava/lang/Object;)Z

    .line 163
    invoke-static {}, Lcom/mobisage/android/e;->a()Lcom/mobisage/android/e;

    move-result-object v1

    const/16 v2, 0x3ed

    invoke-virtual {v1, v2, v0}, Lcom/mobisage/android/e;->a(ILcom/mobisage/android/b;)V

    .line 164
    return-void

    .line 158
    :cond_0
    iget-object v1, v0, Lcom/mobisage/android/b;->c:Landroid/os/Bundle;

    const-string v2, "Keyword"

    const-string v3, ""

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public setCustomData(Ljava/lang/String;)V
    .locals 0
    .parameter "customData"

    .prologue
    .line 116
    iput-object p1, p0, Lcom/mobisage/android/l;->g:Ljava/lang/String;

    .line 117
    return-void
.end method

.method public setKeyword(Ljava/lang/String;)V
    .locals 0
    .parameter "keyword"

    .prologue
    .line 108
    iput-object p1, p0, Lcom/mobisage/android/l;->f:Ljava/lang/String;

    .line 109
    return-void
.end method

.method public setMobiSageAdViewListener(Lcom/mobisage/android/IMobiSageAdViewListener;)V
    .locals 0
    .parameter "listener"

    .prologue
    .line 104
    iput-object p1, p0, Lcom/mobisage/android/l;->listener:Lcom/mobisage/android/IMobiSageAdViewListener;

    .line 105
    return-void
.end method

.method protected switchAdView()V
    .locals 2

    .prologue
    .line 414
    const/4 v0, 0x0

    iput v0, p0, Lcom/mobisage/android/l;->adViewState:I

    .line 416
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    if-eqz v0, :cond_0

    .line 417
    iget-object v0, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    .line 418
    iget-object v1, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    iput-object v1, p0, Lcom/mobisage/android/l;->frontWebView:Lcom/mobisage/android/n;

    .line 419
    iput-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    .line 420
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/mobisage/android/n;->clearCache(Z)V

    .line 421
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->destroyDrawingCache()V

    .line 422
    iget-object v0, p0, Lcom/mobisage/android/l;->backWebView:Lcom/mobisage/android/n;

    invoke-virtual {v0}, Lcom/mobisage/android/n;->clearView()V

    .line 424
    :cond_0
    return-void
.end method
